import { AddCustomAttribute, BaseAttribute, GetTypeOf } from "../../../../../Decorator/Decorator";

export function ResponseType(typeClazz) {

    return function (baseClazz) {
        BaseAttribute(GetTypeOf(ResponseTypeAttribute), baseClazz);

        let type = baseClazz.name;
        let data = new ResponseTypeAttribute(GetTypeOf(typeClazz));
        AddCustomAttribute(type, data);

        // console.log(`ResponseType`);
        // console.log(baseClazz);
        // console.log(typeClazz);
        // console.log(data);
    }
}

export class ResponseTypeAttribute {

    private _Type: string;
    public get Type(): string {
        return this._Type;
    }

    constructor(type: string) {
        this._Type = type;
    }

}